<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 单线程
        // 开辟一个多线程
        // 现代前端越来越复杂 大数据 API 前端数据可视化(canvas， three.js)
        // 前端压缩
        var worker = new Worker('./work.js')
        worker.postMessage('Hello Word')
        worker.onmessage = function(event) {
            console.log('Received message' + event.data);
        }
    </script>
</body>
</html>